<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<!--使用veu开发前端-->
<script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
<script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>

<!-- 使用bootStrap引入文件时需要注意顺序，最好按照以下顺序引入 -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/popper.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</head>
<body>
	<div class="container"
		style="background-image: url('images/login_bg.gif'); background-size: 100% 100%; height: 800px; width: 90%; border: 1px solid grey;">
		<div class="row" style="height: 30%;"></div>
		<div class="row" style="height: 35%;">
			<div class="col-sm-5">
				<div class="row"></div>
			</div>
			<div id="managerLg" class="col-sm-4">
				<p></p>
				<div class="row" style="height: 20%">
					<font style="color: white;" size="4.5px;">蜗牛拍卖后台管理系统</font>
				</div>
				用户名：<input type="" name="" v-model="account"
					style="width: 200px; height: 25px;"><br>
				<p></p>
				密&nbsp;&nbsp;&nbsp;&nbsp;码：<input type="" name=""
					style="width: 200px; height: 25px;" v-model="pwd"><br>
				<p></p>
				验证码：<input type="" name="" style="width: 90px; height: 25px;"
					v-model="code">&nbsp;<img src="code/getCode"
					onclick="changeCode()" id="checkcode"><br>
				<p></p>
				<div class="row">
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<button class="btn  btn-primary disabled" @click="login()">登录</button>
				</div>

			</div>
			<div class="col-sm-3"></div>
		</div>
		<div class="row" style="height: 35%;"></div>
	</div>
	<script type="text/javascript">
		new Vue({
			el : "#managerLg",
			data : {
				account : "",
				pwd : "",
				code : ""
			},
		methods:{
			login:function(){
				// 1 得到用户输入的账户和密码，发送登录请求
				var param = new URLSearchParams();
				param.append('account',this.account);
				param.append('pwd',this.pwd);
				param.append('code',this.code);
				axios.post('user/login',param).then(res =>{
					console.info(res);
				})
			}
		}

		});

		//刷新验证码
		function changeCode() {

			$("#checkcode").prop("src", "code/getCode?" + Math.random());//重新设置url 重新发送请求，获取图片
		}
	</script>

</body>
</html>